package SensorTests;

import lejos.nxt.*;

public class SonicTest {
  public static void main(String[] args) throws Exception {
    UltrasonicSensor sonic = new UltrasonicSensor(SensorPort.S1);

    while (!Button.ESCAPE.isPressed()) {
      System.out.println(sonic.getDistance());
    }
  }
}